extends layout

block headContent
	title Tools

mixin toolSections(sectionsData)
	.row
		each indexList in sectionsData
			.col
				ul.list-unstyled.mb-3
					each sectionIndex in indexList
						- var section = config.site.toolSections[sectionIndex];

						+contentSection(section.name)

							each itemIndex, itemIndexIndex in section.items
								- var item = config.siteTools[itemIndex];

								if (itemIndexIndex > 0)
									hr
								
								.clearfix
									.float-start.pt-1(style="width: 38px;")
										i.fs-5(class=item.iconClass, style="width: 20px; margin-right: 10px;")

									.float-start
										div
											a(href=item.url) #{item.name}

								div.mt-n1(style="padding-left: 39px;")
									p #{item.desc}




block content
	+pageTitle("Tools")


	div
		//- var sections1Col = config.site.toolSections.filter(x => true);// utils.splitArrayIntoChunksByChunkCount(priorityList, 1);
		//- var indexLists2Col = utils.splitArrayIntoChunksByChunkCount(priorityList, 2);
		- var sectionIndexes3Col = [[0, 1], [2], [3, 4]];//config.site.toolSections.filter(x => true); utils.splitArrayIntoChunksByChunkCount(priorityList, 3);

		// xs
		if (true)
			div.d-block.d-sm-none(id="tools-1-col")
				+toolSections([[0, 1, 2, 3, 4]])

		// sm, md, lg
		div.d-none.d-sm-block.d-xl-none(id="tools-2-col")
			+toolSections([[0, 1, 4], [2, 3]])
			

		// xl, xxl
		div.d-none.d-xl-block(id="tools-3-col")
			+toolSections([[0, 1], [2], [3, 4]])

		